package com.yummy.mapper;

import com.yummy.dto.QueryOrderVo;
import com.yummy.entity.Orders;
import com.yummy.common.CommonMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yinbo
* @description 针对表【orders(订单表)】的数据库操作Mapper
* @createDate 2022-08-29 23:07:35
* @Entity com.yummy.entity.Orders
*/
public interface OrdersMapper extends CommonMapper<Orders> {

        int updateForDeleteByPrimaryKey(String... ids);


        List<Orders> selectOrderByCondition(QueryOrderVo orders);

        List<Orders> selectAllOrderOfUser(int userId);
        List<Orders> selectAllOrderOfUser2(int userId);
        List<Orders> selectAllOrderOfUser3(int userId);
        List<Orders> selectAllOrderOfUser4(int userId);

        int selectCountOfUnpay(int userId);
        int selectCountOfUnpay2(int userId);
        int selectCountOfUnpay3(int userId);

	int insertOrder(Orders orders);

	int updateStateByNumber(@Param("number") String tradeNo, @Param("status") int status);
}
